Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@graphql-codegen/plugin-helpers
Advanced tools
The @graphql-codegen/plugin-helpers package provides utility functions and types that are used to develop plugins for GraphQL Code Generator. It helps with the creation of custom plugins by providing common functionalities such as schema and document handling, plugin validation, and configuration management.
Validate Plugins
This feature allows developers to validate the structure of plugins to ensure they conform to the expected interface required by GraphQL Code Generator.
const { validatePlugins } = require('@graphql-codegen/plugin-helpers');
const plugins = [
{ plugin: require('some-graphql-codegen-plugin') }
];
validatePlugins(plugins);
Normalize Output Parameters
This utility normalizes output parameters, which can be used to handle file paths and names in a consistent manner across different plugins.
const { normalizeOutputParam } = require('@graphql-codegen/plugin-helpers');
const output = 'path/to/output.ts';
const normalizedOutput = normalizeOutputParam(output);
Create Schema AST
This function is used to create a GraphQL schema AST from a GraphQL schema object, which can then be used by plugins to generate code.
const { createSchemaAst } = require('@graphql-codegen/plugin-helpers');
const { buildSchema } = require('graphql');
const schema = buildSchema(`type Query { hello: String }`);
const schemaAst = createSchemaAst(schema);
The graphql-tools package is a set of utilities for working with GraphQL schemas in JavaScript. It provides functionalities for schema stitching, mocking, and more. While it overlaps with some of the schema handling features of @graphql-codegen/plugin-helpers, it is more focused on schema manipulation rather than code generation plugin development.
graphql-config is a tool for loading GraphQL configuration files. It helps developers manage and share configurations for their GraphQL projects. While it also deals with GraphQL configurations, it is not specifically tailored for code generation plugin development like @graphql-codegen/plugin-helpers.
FAQs
GraphQL Code Generator common utils and types
The npm package @graphql-codegen/plugin-helpers receives a total of 7,104,335 weekly downloads. As such, @graphql-codegen/plugin-helpers popularity was classified as popular.
We found that @graphql-codegen/plugin-helpers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.